{% extends 'activity/activity-layout.html.twig' %}
{% do script(['libs/ltc-sdk-client.js', cloud_sdk_url('uploader'), 'flashactivity/js/create/index.js']) %}
{% set flash = activity.ext|default(null) %}
{% set mediaType = 'flash' %}
{% block activity_step %}
  <div class="tab-pane js-course-tasks-pane active js-step2-view">
    <form class="form-horizontal" data-media-id="{{ flash.mediaId|default(null) }}" id="step2-form" >
      <div class="form-group">
        <div class="col-sm-2 control-label">
          <label for="title" class="control-label-required">{{ 'course.plan_task.activity_manage.title_name'|trans }}</label>
        </div>
        <div class="col-sm-10">
          <input id="title" class="form-control" type="text" name="title" value="{{ activity.title|default('') }}" >
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-2 control-label">
          <label for="mediaId" class="style control-label-required">Flash</label>
        </div>
        <div class="col-sm-10">
          {% include 'file-chooser/file-choose.html.twig' with {
            courseId: activity.fromCourseId,
            mediaType: 'flash',
            fileType:'flash',
            file: flash.file|default(null),
            placeholder: 'Flash'
          } %}
        </div>
        <p class="col-sm-offset-2 col-sm-10 mt10 color-warning">{{'course.plan_task.activity_manage.flash.play_tips'|trans}}</p>
      </div>
    </form>
  </div>
{% endblock %}